﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Shsc.Net.FrameWork.Entity;
using Shsc.Net.FrameWork.Entity.Base;

namespace Shsc.Net.FrameWork.Dao.Base
{
    public interface IBaseDao
    {
        /// <summary>
        /// 
        /// </summary>
        /// <returns></returns>
        IList<BaseEntity> GetAll();

        /// <summary>
        /// 
        /// </summary>
        /// <param name="entity"></param>
        /// <returns></returns>
        BaseEntity SelectByKey(BaseEntity entity);

        /// <summary>
        /// 
        /// </summary>
        /// <param name="entity"></param>
        /// <returns></returns>
        int Insert(BaseEntity entity);

        /// <summary>
        /// 
        /// </summary>
        /// <param name="entity"></param>
        /// <returns></returns>
        int Update(BaseEntity entity);

        /// <summary>
        /// 
        /// </summary>
        /// <param name="entity"></param>
        /// <returns></returns>
        int UpdateUnlessNull(BaseEntity entity);

        /// <summary>
        /// 
        /// </summary>
        /// <param name="entity"></param>
        /// <returns></returns>
        int UpdateModifiedOnly(BaseEntity entity);

        /// <summary>
        /// 
        /// </summary>
        /// <param name="entity"></param>
        /// <returns></returns>
        int Delete(BaseEntity entity);
    }
}


